package one.stand.service;

import one.stand.entity.TokenEntity;
import one.stand.model.CommentModel;
import one.stand.model.CompanyModel;
import one.stand.model.ResultModel;
import one.stand.request.GetWxPhoneRequest;
import one.stand.request.GlobalConfigurationRequest;
import one.stand.request.SendSmsCodeRequest;
import one.stand.request.WxLoginRequest;
import one.stand.response.BusinessCardResponse;
import one.stand.response.GlobalConfigurationResponse;
import one.stand.response.LoginResponse;

import java.util.List;

/**
 * @author Administrator
 */
public interface HomeService {
    /**
     * 登陆信息验证
     * 延长登录的有效期，如果延长登录出现问题打印出异常，不做处理
     * @param token
     * @return
     */
    ResultModel<TokenEntity> getLoginInfo(String token);

    /**
     * 微信登陆
     *
     * @param request
     * @return
     */
    ResultModel<LoginResponse> loginByWeixin(WxLoginRequest request);


    /**
     * 微信登陆
     *
     * @param request
     * @return
     */
    ResultModel<LoginResponse> crmPcLoginBySms(WxLoginRequest request);
    /**
     * 游客身份登录
     * 数据库中创建一个User，并返回user 的信息，主要是user id
     * userId
     * companyName
     * @return user 信息
     */
    ResultModel<LoginResponse> wxLoginByTourists(WxLoginRequest request);

    /**
     * 登陆验证
     *
     * @param token
     * @return
     */
    ResultModel<Boolean> loginVerification(String token);

    /**
     * 获取用户信息
     * @param userId
     * @return
     */
    ResultModel<BusinessCardResponse> userInfo(Long userId);

    ResultModel<String> getPhone(GetWxPhoneRequest request) ;

    /**
     * 微信pc登陆
     * @return
     */
    ResultModel getPcLoginImg(String companyKey);

    ResultModel pcLoginCallBack(String code,String state);


    ResultModel<List<GlobalConfigurationResponse>>  initial(GlobalConfigurationRequest request);

    ResultModel<Boolean> batchDelToken(Long[] ids);


    /**
     * 短信发送
     * @return
     */
    ResultModel<Boolean> sendSms(SendSmsCodeRequest request);

    /**
     * 获取电话所在的企业
     * @return
     */
    ResultModel<List<CompanyModel>> getCompanyListByPhone(SendSmsCodeRequest request);


}
